package com.amumu.netctoss.vo;
/**
 * VO对象，根据账单明细页面显示需要,依据页面列表项编写
 */
public class BillItem {

	private Integer id;
	private String osUsername;
	private String hostIp;
	private Integer accountId;
	private Long duration;
	private Double cost;
	private String costName;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getOsUsername() {
		return osUsername;
	}
	public void setOsUsername(String osUsername) {
		this.osUsername = osUsername;
	}
	public String getHostIp() {
		return hostIp;
	}
	public void setHostIp(String hostIp) {
		this.hostIp = hostIp;
	}
	public Integer getAccountId() {
		return accountId;
	}
	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}
	public Long getDuration() {
		return duration;
	}
	public void setDuration(Long duration) {
		this.duration = duration;
	}
	public Double getCost() {
		return cost;
	}
	public void setCost(Double cost) {
		this.cost = cost;
	}
	public String getCostName() {
		return costName;
	}
	public void setCostName(String costName) {
		this.costName = costName;
	}
	public String toDuration(){
		String str ="";
		long hour = this.duration/3600;
		long minute = (this.duration%3600)/60;
		long second = this.duration%60;
		if(hour>0){
			str+=hour+"小时";
		}
		if(minute>0){
			str+=minute+"分";
		}
		str+=second+"秒";
		return str;
	}
	
}
